const port = process.env.port || process.env.npm_config_port || 9528 // dev port

module.exports = {
  publicPath: '/dist/',
  lintOnSave: process.env.NODE_ENV === 'development',
  devServer: {
    open: true,
    overlay: {
      warnings: false,
      errors: false
    },
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        target: `http://127.0.0.1:${port}/`,
        changeOrigin: true,
        pathRewrite: {
          ['^' + process.env.VUE_APP_BASE_API]: ''
        }
      }
    }
  }
}
